package homework.module2;

/**
 * 通话套餐类
 */
public class CallSet extends AbstractSet implements CallService{

    public int callTime;  // 通话时长
    public int messageNum;  // 短信条数


//    public void showAllSet(){
//        System.out.println("通话时长:" + callTime);
//        System.out.println("短信条数:" + messageNum);
//        System.out.println("每月资费:" + costPerMonth);
//    }

    /**
     * 接口方法
     * @param callNum
     * @param simCard
     */
    @Override
    public void show(int callNum, SimCard simCard) {
        System.out.println("调用接口方法，开始打印手机卡通话信息!");
        System.out.println("通话时长:" + callTime);
        System.out.println("短信条数:" + messageNum);
        System.out.println("每月资费:" + costPerMonth);
    }

    /**
     * 抽象类方法
     */
    @Override
    public void show() {
        System.out.println("通话时长:" + callTime);
        System.out.println("短信条数:" + messageNum);
        System.out.println("每月资费:" + costPerMonth);
    }

    public static void main(String[] args){
        AbstractSet aa = new CallSet();
        aa.show();
    }
}
